package com.haust.su.ghyy.hospital.repository;

import com.haust.su.ghyy.model.hosp.Schedule;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

/**
 * @author haustsusu
 * @create 2023-04-27-15:02
 */
@Repository
public interface ScheduleRepository extends MongoRepository<Schedule,String> {
    //根据医院编号和排班编号进行查询
    Schedule getScheduleByHoscodeAndHosScheduleId(String hoscode, String hosScheduleId);

    //根据医院编号,科室信息和工作日期,查询排班的详细信息
    List<Schedule> findScheduleByHoscodeAndDepcodeAndWorkDate(String hoscode, String depcode, Date toDate);

    //根据scheduleid查询schedule
    Schedule getScheduleById(String scheduleId);
}
